﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using IosDatamodel;
using System.Web.Mvc;
namespace IOSpro.Lib
{



    public class QRBL:IQRBL
    {
        private IosDBEntities db;
        private ModelStateDictionary _errg;


        public  QRBL(ModelStateDictionary ModelState)
        { 
             db = new IosDBEntities();
            _errg = ModelState;
        
        
        
        }


        public void AddProductQRString(string QRString) 
        {
            ProductQR PQRstring = new ProductQR
            {
                          QRString=QRString
            };
            db.ProductQR.Add(PQRstring);
            db.SaveChanges();
           
        
        
        }
        public IQueryable<ProductQR> GetProductQRList() 
        
        {
            var aa=from a in db.ProductQR select a;
            return aa;
        
        
        
        }

        public void AddVideoQRString(string VQRString) 
        {
            VideoQRString VQRstring = new VideoQRString
            {
                videoqr = VQRString
            };
            db.VideoQRString.Add(VQRstring);
            db.SaveChanges();
           
        
        
        
        }
        public IQueryable<VideoQRString> GetVIdeoQRList() 
        {
            var aa = from a in db.VideoQRString select a;
            return aa;
         
        
        
        }
    }
}